# -*- coding: utf-8 -*-
'''
Created on 2014/02/28

@author: deadblue
'''
from cn.twodland.common import oauth, rpc
from cn.twodland.togame import key

class APIClient():
    '''
    饭否API客户端
    '''

    def __init__(self):
        oauth.OAuthConfig.API_KEY = key.FANFOU_API_KEY
        oauth.OAuthConfig.TOKEN = key.TOGAME_OAUTH_TOKEN
        oauth.OAuthConfig.SECERT = '%s&%s' % (key.FANFOU_API_SECRET, key.TOGAME_OAUTH_SECERT)

    @rpc.oauth_rpc('http://api.fanfou.com/statuses/user_timeline.json', 'GET')
    def status_user_timeline(self, id=None, since_id=None, count=None):  # @ReservedAssignment
        pass
    @rpc.oauth_rpc('http://api.fanfou.com/statuses/mentions.json', 'GET')
    def status_mentions(self, since_id=None, count=20):
        pass
    @rpc.oauth_rpc('http://api.fanfou.com/statuses/update.json', 'POST')
    def status_update(self, status, in_reply_to_status_id=None, in_reply_to_user_id=None):
        pass

    @rpc.oauth_rpc('http://api.fanfou.com/direct_messages/inbox.JSON', 'GET')
    def message_inbox(self, since_id=None, count=20):
        pass
    @rpc.oauth_rpc('http://api.fanfou.com/direct_messages/new.json', 'POST')
    def message_new(self, user, text, in_reply_to_id=None):
        pass
